﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<!--#include virtual="/Common/Cls_Upload.asp" -->
<!--#include file="Spot_Pic_Inc.asp" -->
<%

If Request.ServerVariables ("Request_Method")="POST" Then

	'禁止从网站外部提交数据
	Call Deny_OutSiteSubit()

	Set  Aspto = new Cls_Upload
	aspto.FileType=Upload_FileType
	
	Aspto.MaxSize = Max_Upload_Size
	Aspto.SavePath=Upload_SavePath&"Spot_Pic/"   '图片上传位置 /UploadImages/Pic_Gallery/

	Aspto.Open() 

	For intTemp=1 To Ubound(Aspto.FileItem)
		FormName = Aspto.FileItem(intTemp)
		IF Int(Aspto.Form(FormName&"_Err")) = Int(0) Then
			ImageName = ImageName&Aspto.Form(FormName)&"|"
		End If

	Next

	If ImageName<>"" Then
		Pic_Path = Left(ImageName,Len(ImageName)-1)
	Else
		Pic_Path = ""
	End If

	
	IP_ID		= get_safecode(Aspto.Form("IP_ID"))
	Spot_ID		= get_safecode(Aspto.Form("Spot_ID"))

	IP_Title	= get_safecode(Aspto.Form("IP_Title"))

	IP_IsCover  = get_safecode(Aspto.Form("IP_IsCover"))

	IP_Path_Old	= get_safecode(Aspto.Form("IP_Path_Old"))

	Set Aspto = nothing 


	Call News_Pic_Edit()
Else


	Call Get_News_Pic()
	
	If IP_Path="" Then
		Pic_Path_S = ""
	Else
		Pic_Path_S = "<img class=img01 border=1 src="""&Get_SmallPic(IP_Path)&""" >"
	End If

End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/2010admin/css/default.css" type="text/css" rel="stylesheet">
<title><%=web_title%></title>
<script language="javascript" src="/2010admin/js/validator.js"></script>
</head>
<body >
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
  <tr>
    <td width="100%" height="5"></td>
  </tr>
  <tr>
    <td width="100%" align="center">
      <table border="0" width="98%" cellSpacing="0" cellPadding="0">
        <tr>
          <td width="*" align="center" valign="top">
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">管理导航</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="20">&nbsp;<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="userlist"><a href="Spot_Pic_Query.asp?Spot_ID=<%=Spot_ID%>">图片列表</a>&nbsp<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="useradd"><a href="Spot_Pic_Add.asp?Spot_ID=<%=Spot_ID%>">增加新的图片</a></span></td>
                    </tr>
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0">
              <tr>
                <td width="100%" height="5"></td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">修改图片</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                  <form action="Spot_Pic_Edit.asp" method="post" enctype="multipart/form-data" name="form" onSubmit="return Validator.Validate(this, 2)">
                    <tr>
                      <td width="80" height="25">图片名称</td>
                      <td width="*"><input type="text" name="IP_Title" size="60" dtype="Limit" min="2" max="100" dmsg="图片名称必须在2-100个字符间" value="<%=IP_Title%>"></td>
                    </tr>
                    <tr>
                      <td height="25">&nbsp;</td>
                      <td><%=Pic_Path_S%></td>
                    </tr>

                    <tr>
                      <td width="80" height="25">图片文件</td>
                      <td width="*"><input type="file" name="file" onkeydown= "event.returnValue=false; ">&nbsp;&nbsp;&nbsp;&nbsp;
                      
                      </td>
                    </tr>

                    
                    <tr>
                      <td height="25">设为专辑封面</td>
                      <td><% MyRadioList "IP_IsCover","1,0","是,否",IP_IsCover %></td>
					</tr>
					<tr>
                      <td height="25"></td>
                      <td><input type="submit" name="submit" value="提交" class="button"></td>
                    </tr>
					<INPUT TYPE="hidden" NAME="IP_ID" value="<%=IP_ID%>">
					<INPUT TYPE="hidden" NAME="Spot_ID" value="<%=Spot_ID%>">
					
					<INPUT TYPE="hidden" NAME="IP_Path_Old" value="<%=IP_Path%>">
                  </form>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="5"></td>
  </tr>
</table>
</body>
</html>

<%
Call conn_close()
%>

